<!--
# This file is part of Digidoc
#
# Gemag is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

# Digidoc Copyright (C) 2008 Paolo Alberti <paolo.alberti_at_gmail.com>
-->

{{extend 'layout.html'}}

<h1>Generazione scarico di magazzino</h1>

<div class="frame">
    <h2>Ente Destinatario:</h2>
    <table class="sortable">
        <thead>
            <tr>
                <td>Id</td>
                <td>Tipo</td>
                <td>Descrizione</td>
                <td>Provincia</td>
            </tr>
        </thead>
        <tr>
            <td>{{=ente.id}}</td>
            <td>{{=ente.tipo}}</td>
            <td>{{=ente.descrizione}}</td>
            <td>{{=ente.provincia}}</td>
        </tr>
    </table>
</div>
<br>
<div class="frame">
    <h2>Articolo da scaricare</h2>
    {{=ric_art}}
    <table class="sortable">
        <thead>
            <tr>
                <td>Id</td>
                <td>Categoria</td>
                <td>Descrizione</td>
                <td>Matricola</td>
                <td>Quant.</td>
            </tr>
        </thead>
        {{for articolo in articoli:}}
        <tr>
            <td>{{=A(IMG(_src=URL(r=request,c='static',f='zoom.png')),\
            _href=URL(r=request,f='scarico_articoli_list/%s'%articolo.id,args=[ente.id,quantita]))}}</td>
            <td>{{=articolo.categoria}}</td>
            <td>{{=articolo.descrizione}}</td>
            <td>{{=articolo.matricola}}</td>
            <td>{{=articolo.quantita}}</td>
        </tr>
        {{pass}}
    </table>
    
</div>
<br>
<div class="frame">
    <h2>Lista di scarico</h2>
    {{=SQLTABLE(listamovimenti,headers=headers,_class='sortable')}}
</div>